home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / CTASK11.LHA / CronTask / Install / Install CronTask < prev    next >
Encoding:
Text File  |  1994-10-26  |  10.0 KB  |  429 lines

  1. ;$VER: CronTask Install 1.0 (Sep 25 1994) 
  2. ;Copyright © 1994 JoJoSoft Development. All rights reserved.
  3.  
  4. ;=============================================================================
  5. ; English strings
  6. ;=============================================================================
  7.  
  8. (if (= @language "english")
  9. (
  10.     (set #default_language 1)
  11.  
  12.     (set #install-msg
  13.         (cat "\n\nInstalling CronTask in your system.\n\n"
  14.              "CronTask © 1994 JoJoSoft Development.\n"
  15.              "All rights reserved." ))
  16.  
  17.     (set #AreYouSureUnInstall "\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nAre you sure you want to uninstall CronTask.")
  18.     (set #UnInstallFinished "\\n\\n\\n\\nCronTask uninstall is finished. CronTask has sadly \\nenough been removed from your system.")
  19.     (set #ChooseDir    "\nChoose destination directory\nfor ")
  20.     (set #GetUnPathText (cat #ChooseDir "the uninstallation script\n"))
  21.     (set #CopyCronTaskText (cat #ChooseDir "CronTask\n"))
  22.     (set #CopyCronPrefsText (cat #ChooseDir "CronPrefs\n"))
  23.     (set #CopyCronLibText "\nCopying 'cronserver.library' to LIBS:.\n")
  24.     (set #IconEnhPrompt "\n\n\n\n\n\n\n\nWhich icon set do you want to install?")
  25.     (set #IconEnhGadgets1 "Standard (4 colors)")
  26.     (set #IconEnhGadgets2 "Enhanced (8 colors)")
  27.     (set #DocPathPrompt (cat #ChooseDir "the documention\n"))
  28.  
  29.     (set #wrong-kick (cat "This program is a heavy user of OS 2.x. Buy it, you wont regret it! For starters you could use the best Cron ever." ))
  30.  
  31.     (set #which-language (cat "\nWhich languages should be installed?" ))
  32.     (set #which-language-help
  33.         (cat "\nOne of the best features of Workbench 2.1 was\n"
  34.              "the abilty to work in different languages.\n"
  35.              "CronTask uses this feature. If your language\n"
  36.              "is avilable then select it and make the most\n"
  37.              "out of CronTask\n\n"
  38.               @askoptions-help ))
  39.  
  40.     (set #which-document (cat "\nWhich documentations should be installed?" ))
  41.     (set #which-document-help
  42.         (cat "Hjälp!!!"
  43.                 @askoptions-help ))
  44.  
  45.     (set #Ending (cat "\n\nWe congratulate you to your fine choice of Cron. Make\n"
  46.                              "sure to read the manual carefully so you don't\n"
  47.                              "missout on any of the great features of CronTask.\n\n\n"
  48.                              "An unistall script has been created: "))
  49.  
  50. ))
  51.  
  52. ;=============================================================================
  53. ; Svenska strängar
  54. ;=============================================================================
  55.  
  56. (if (= @language "svenska")
  57. (
  58.     (set #default_language 2)
  59.  
  60.     (set #install-msg
  61.         (cat "\n\nInstallerar CronTask i ditt system.\n\n"
  62.              "CronTask © 1994 JoJoSoft Development.\n"
  63.              "Alla rättigheter reserverade."
  64.     ))
  65.  
  66.     (set #AreYouSureUnInstall "\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nÄr du säker på att du vill avinstallera CronTask?")
  67.     (set #UnInstallFinished "\\n\\n\\n\\nCronTask avinstallation är klar. CronTask har\\nsorgligt nog blivit borttaget från ditt system.")
  68.     (set #ChooseDir    "\nVälj en katalog för\n ")
  69.     (set #GetUnPathText (cat #ChooseDir "avinstallations scriptet\n"))
  70.     (set #CopyCronTaskText (cat #ChooseDir "CronTask\n"))
  71.     (set #CopyCronPrefsText (cat #ChooseDir "CronPrefs\n"))
  72.     (set #CopyCronLibText "\nKopierar 'cronserver.library' till LIBS:.\n")
  73.     (set #IconEnhPrompt "\n\n\n\n\n\n\n\nVilken ikon uppsättning vill du installera?")
  74.     (set #IconEnhGadgets1 "Standard (4 färgers).")
  75.     (set #IconEnhGadgets2 "Förfinat (8 färgers).")
  76.     (set #DocPathPrompt (cat #ChooseDir "dokumenten\n"))
  77.  
  78.     (set #wrong-kick (cat "Detta program är en tung användare av OS 2.x. Köp det, du kommer inte ångra dig! Till att börja med kan du då använda den bästa Cron någonsin." ))
  79.  
  80.     (set #which-language (cat "\nVilka språk ska bli installerade?" ))
  81.     (set #which-language-help
  82.         (cat "\nEn av dom bästa finesserna i Workbench 2.1 var\n"
  83.              "möjligheten att arbeta i olika språk.\n"
  84.                  "CronTask använder denna finess. Om ditt språk finns\n"
  85.                  "tillgängligt, välj det och gör det mesta av CronTask.\n"
  86.               @askoptions-help ))
  87.  
  88.     (set #which-document (cat "\nVilka dokument ska bli installerade?" ))
  89.     (set #which-document-help
  90.         (cat "Hjälp!!!"
  91.                 @askoptions-help ))
  92.  
  93.     (set #Ending (cat "\n\nVi gratulerar till ditt fina val av Cron. Se till\n"
  94.                              "att läsa manualen noggrant så du inte missar några av\n"
  95.                              "CronTask's alla finesser.\n\n\n"
  96.                              "Ett avinstallations script har skapats: "))
  97. ))
  98.  
  99. ;--------------------------
  100. ; Script's real beginning.
  101. ;--------------------------
  102.  
  103. (if (< (/ (getversion) 65536) 37)
  104. (
  105.     (abort #wrong-kick)
  106. ))
  107.  
  108. (user 2)
  109. (welcome (message #install-msg))
  110.  
  111. (complete 0)
  112.  
  113. (set DefUn-Path
  114.     (askdir
  115.         (prompt #GetUnPathText)
  116.         (help @askdir-help)
  117.         (default "RAM:")
  118.     )
  119.  
  120. (copyfiles
  121.     (newname "Un-Install CronTask.info")
  122.     (source "English.info")
  123.     (dest DefUn-Path)
  124. )
  125.  
  126. (tooltype
  127.     (dest (cat DefUn-Path "Un-Install CronTask"))
  128.     (settooltype "SCRIPT" "Un-Install CronTask")
  129.     (settooltype "MINUSER" "EXPERT")
  130.     (noposition)
  131. )
  132.  
  133. (working #install-msg)
  134.  
  135. (run (cat "echo >\"" DefUn-Path "Un-Install CronTask\""))
  136. (set Un-Path (cat "echo >>\"" DefUn-Path "Un-Install CronTask\""))
  137.  
  138. (run Un-Path "\";$VER: CronTask Un-Install 1.0 (Sep 25 1994)\"")
  139. (run Un-Path "\";Copyright © 1994 JoJoSoft Development. All rights reserved\"")
  140. (run Un-Path "\"(complete 0)\"")
  141. (run (cat Un-Path "\"(user 2)\""))
  142. (run (cat Un-Path "\"(welcome (message '" #AreYouSureUnInstall "'))\""))
  143. (run (cat Un-Path "\"(delete '" DefUn-Path "Un-Install CronTask')\""))
  144. (run (cat Un-Path "\"(delete '" DefUn-Path "Un-Install CronTask.info')\""))
  145. (run (cat Un-Path "\"(run 'delete ENV:Cron all')\""))
  146. (run (cat Un-Path "\"(run 'delete ENVARC:Cron all')\""))
  147. (run Un-Path "\"(complete 10)\"")
  148.  
  149. ;--------------------------------------------------
  150. ; Copying CronTask, Cronprefs & cronserver.library.
  151. ;--------------------------------------------------
  152.  
  153. (set CronTask-Path
  154.     (askdir
  155.         (prompt #CopyCronTaskText)
  156.         (help @askdir-help)
  157.         (default "SYS:WBStartup/")
  158.     )
  159. )
  160.  
  161. (copyfiles
  162.     (source "/CronTask")
  163.     (dest CronTask-Path)
  164.     (infos)
  165. )
  166.  
  167. (complete 8)
  168.  
  169. (working #install-msg)
  170.  
  171. (run (cat Un-Path "\"(run '" CronTask-Path "CronTask q')\""))
  172. (run Un-Path "\"(complete 20)\"")
  173. (run (cat Un-Path "\"(delete '" CronTask-Path "CronTask.info')\""))
  174. (run (cat Un-Path "\"(delete '" CronTask-Path "CronTask')\""))
  175. (run Un-Path "\"(complete 30)\"")
  176.  
  177. (complete 16)
  178.  
  179. (set CronPrefs-Path
  180.     (askdir
  181.         (prompt #CopyCronPrefsText)
  182.         (help @askdir-help)
  183.         (default "SYS:Prefs/")
  184.     )
  185.  
  186. (copyfiles
  187.     (source "/CronPrefs")
  188.     (dest CronPrefs-Path)
  189.     (infos)
  190. )
  191.  
  192. (complete 24)
  193.  
  194. (working #install-msg)
  195.  
  196. (run (cat Un-Path "\"(delete '" CronPrefs-Path "CronPrefs')\""))
  197. (run Un-Path "\"(complete 40)\"")
  198. (run (cat Un-Path "\"(delete '" CronPrefs-Path "CronPrefs.info')\""))
  199. (run Un-Path "\"(complete 50)\"")
  200.  
  201. (complete 32)
  202.  
  203. (copylib
  204.     (prompt #CopyCronLibText)
  205.     (help @copylib-help)
  206.     (source "/Libs/cronserver.library")
  207.     (dest "LIBS:")
  208.     (confirm)
  209. )
  210.  
  211. (working #install-msg)
  212.  
  213. (run (cat Un-Path "\"(delete 'Libs:cronserver.library')\""))
  214. (run Un-Path "\"(complete 60)\"")
  215.  
  216. (complete 40)
  217.  
  218. ;-----------------
  219. ; Copying icon's.
  220. ;-----------------
  221.  
  222. (set #Enhanced
  223.     (askchoice
  224.         (prompt #IconEnhPrompt)
  225.         (default 0)
  226.         (choices #IconEnhGadgets1 #IconEnhGadgets2)
  227.         (help "Hjälp!!!")
  228.     )
  229. )
  230.  
  231. (complete 56)
  232.  
  233. (if #Enhanced
  234. (
  235.     (copyfiles
  236.         (source "/Icons/CronTask.info")
  237.         (dest CronTask-Path)
  238.     )
  239.  
  240.     (copyfiles
  241.         (source "/Icons/CronPrefs.info")
  242.         (dest CronPrefs-Path)
  243.     )
  244. ))
  245.  
  246. (complete 64)
  247.  
  248. (tooltype
  249.     (dest (cat CronTask-Path "CronTask"))
  250.     (settooltype "DONOTWAIT" "")
  251.     (noposition)
  252. )
  253.  
  254. (tooltype
  255.     (dest (cat CronPrefs-Path "CronPrefs"))
  256.     (noposition)
  257. )
  258.  
  259. (complete 69)
  260.  
  261. ;-----------------------
  262. ; Copying documentation.
  263. ;-----------------------
  264.  
  265. (set documentation
  266.     (askoptions
  267.         (prompt #which-document)
  268.         (help #which-document-help)
  269.         (choices
  270.             "English"
  271.             "Svenska")
  272.             (default #default_language)
  273.         )
  274. )
  275.  
  276. (complete 72)
  277.  
  278. (set count 0)
  279. (set #askdocpath 1)
  280.  
  281. (while (set doc (select count
  282.                                 "english"
  283.                                 "svenska"
  284.                                 ""))
  285. (
  286.     (if (IN documentation count)
  287.     (
  288.         (if #askdocpath
  289.         (
  290.             (set #askdocpath 0)
  291.             
  292.             (set Doc-Path
  293.                 (askdir
  294.                     (prompt #DocPathPrompt)
  295.                     (help @askdir-help)
  296.                     (default CronPrefs-Path)
  297.                 )
  298.             ) 
  299.         ))
  300.  
  301.         (if (= count 0)
  302.         (
  303.             (copyfiles
  304.                 (source "/Docs/CronTask.guide.eng")
  305.                 (dest Doc-Path)
  306.                 (infos)
  307.             )
  308.  
  309.             (if #Enhanced
  310.             (
  311.                 (copyfiles
  312.                     (newname "CronTask.guide.eng.info")
  313.                     (source "/Icons/Doc.info")
  314.                     (dest Doc-Path)
  315.                 )
  316.             ))
  317.  
  318.             (tooltype
  319.                 (dest (cat Doc-Path "CronTask.guide.eng"))
  320.                 (noposition)
  321.             )
  322.  
  323.             (working #install-msg)
  324.  
  325.             (run (cat Un-Path "\"(delete '" Doc-Path "CronTask.guide.eng')\""))
  326.             (run (cat Un-Path "\"(delete '" Doc-Path "CronTask.guide.eng.info')\""))
  327.         ))
  328.  
  329.         (if (= count 1)
  330.         (
  331.             (copyfiles
  332.                 (source "/Docs/CronTask.guide.sve")
  333.                 (dest Doc-Path)
  334.                 (infos)
  335.             )
  336.  
  337.             (if #Enhanced
  338.             (
  339.                 (copyfiles
  340.                     (newname "CronTask.guide.sve.info")
  341.                     (source "/Icons/Doc.info")
  342.                     (dest Doc-Path)
  343.                 )
  344.             ))
  345.  
  346.             (tooltype
  347.                 (dest (cat Doc-Path "CronTask.guide.sve"))
  348.                 (noposition)
  349.             )
  350.  
  351.             (working #install-msg)
  352.  
  353.             (run (cat Un-Path "\"(delete '" Doc-Path "CronTask.guide.sve')\""))
  354.             (run (cat Un-Path "\"(delete '" Doc-Path "CronTask.guide.sve.info')\""))
  355.         ))
  356.     ))
  357.  
  358.     (set count (+ count 1))
  359. ))
  360.  
  361. (working #install-msg)
  362.  
  363. (run Un-Path "\"(complete 90)\"")
  364.  
  365. (complete 80)
  366.  
  367. ;-----------------------
  368. ; Copying locale.
  369. ;-----------------------
  370.  
  371. (if (exists "Sys:Locale" (noreq))
  372. (
  373.     (if (exists "LOCALE:" (noreq))
  374.     (
  375.         (set language
  376.             (askoptions
  377.                 (prompt #which-language)
  378.                 (help #which-language-help)
  379.                 (choices
  380.                     "English"
  381.                     "Svenska")
  382.                     (default #default_language)
  383.                 )
  384.         )
  385.  
  386.         (set count 0)
  387.         (while (set lang (select count
  388.                                         "english"
  389.                                         "svenska"
  390.                                         ""))
  391.         (
  392.             (if (IN language count)
  393.             (
  394.                 (if (<> count 0)
  395.                 (
  396.                     (makedir (cat "LOCALE:Catalogs/" lang))
  397.  
  398.                     (copyfiles
  399.                         (source (cat "/Catalogs/" lang))
  400.                         (dest (cat "LOCALE:Catalogs/" lang))
  401.                         (all)
  402.                     )
  403.  
  404.                     (run (cat Un-Path "\"(delete 'Locale:Catalogs/" lang "/cronprefs.catalog')\""))
  405.  
  406.                 ))
  407.             ))
  408.  
  409.             (set count (+ count 1))
  410.         ))
  411.     ))
  412. ))
  413.  
  414. (complete 88)
  415.  
  416. (user 3)
  417.  
  418. (run Un-Path "\"(complete 100)\"")
  419. (run Un-Path "\"(message '" #UnInstallFinished "')\"")
  420. (run Un-Path "\"(exit (quiet))\"")
  421.  
  422. (complete 100)
  423.  
  424. (message (cat #Ending (substr Un-Path 7)))
  425.  
  426. (exit (quiet))
  427.